﻿using Kw.Data;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace KwDataExamples
{
    class BtreeExample03
    {
        static void Main ()
        {
            var towns = new BtreeDictionary<string, int> ();

            towns.Add ("Albany", 43600);
            towns.Add ("Bandon", 2960);
            towns.Add ("Lebanon", 13140);
            towns.Add ("Roseburg", 20480);
            towns.Add ("Riddle", 1020);
            towns.Add ("Scio", 710);

            double avg = towns.Average (x => x.Value);

            Console.WriteLine ("Average population of sample = {0}", avg);
        }
    }
}
